package com.hkts.naturalgas.tcp;

/**
 * @ClassNameStrUtils
 * @Description
 * @Author yck
 * @Date7/2/2022 下午5:13
 * @Version V1.0
 **/
public class StrUtils {
    public static String splitMN(String str) {
        String[] split = str.split("=");
        return split[1];
    }

    public static String splitDataTime(String str) {
        String[] split = str.split("=");
        return split[2];
    }

    public static String splitSo2orNox(String str, String type) {
        String[] split = str.split(",");
        for (int i = 0; i < split.length; i++) {
            if (split[i].contains(type)) {
                return split[i].split("=")[1];
            }
        }
        return split[2];
    }
}
